package com.zz.cc.owner.util;

import java.util.Comparator;

import com.zz.cc.owner.data.MyCarModel;

public class PinyinComparator implements Comparator{

	@Override
	public int compare(Object o1, Object o2) {
		String str1;
		String str2;
		str1 = PingYinUtil.getPingYin(((MyCarModel) o1).modelName
				.toLowerCase());
		str2 = PingYinUtil.getPingYin(((MyCarModel) o2).modelName
				.toLowerCase());
	     return str1.compareTo(str2);
	}

}
